#include <iostream>

using namespace std;

int N, M, x, y;

int main()
{
	cin >> N >> x >> M >> y;

	// after this, x < y
	if (x > y)
	{
		int temp = x;
		x = y;
		y = temp;
		temp = N;
		N = M;
		M = temp;
	}

	// convert to (N, 0) and (M, y-x)
	y = y-x;
	x = 0;

	int result = 1;
	int j = 2;
	for (int i = y-M; i <= y-1; i++)
	{
		if (i < -N || N < i) result += 1;
		else
		{
			result += j;
			if (i < 0) j += 2;
			else
				if (i > 0) j -= 2;
		}
		cout << i << " " << result << endl;
	}

	cout << result << endl;

	return 0;
}
